package com.api.signature.auto.client.spring;

import com.api.signature.auto.client.config.SignConfigClient;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @author Jerry
 * @date 2024-01-31 16:35
 */
public class ApiClientBeanRegister {

    @Bean
    @ConditionalOnProperty(prefix = "sign-client", name = "enable", havingValue = "true")
    @ConfigurationProperties(prefix = "sign-client")
    public SignConfigClient signConfigClient() {
        return new SignConfigClient();
    }
}
